summaryrefslogtreecommitdiff
path: root/app/[lng]
diff options
context:
space:
mode:
Diffstat (limited to 'app/[lng]')
-rw-r--r--app/[lng]/evcp/(evcp)/(procurement)/pq_new/[vendorId]/[submissionId]/page.tsx48
1 files changed, 41 insertions, 7 deletions
diff --git a/app/[lng]/evcp/(evcp)/(procurement)/pq_new/[vendorId]/[submissionId]/page.tsx b/app/[lng]/evcp/(evcp)/(procurement)/pq_new/[vendorId]/[submissionId]/page.tsx
index c8b0e9b8..c63cf4df 100644
--- a/app/[lng]/evcp/(evcp)/(procurement)/pq_new/[vendorId]/[submissionId]/page.tsx
+++ b/app/[lng]/evcp/(evcp)/(procurement)/pq_new/[vendorId]/[submissionId]/page.tsx
@@ -36,14 +36,37 @@ export default async function PQReviewPage(props: PQReviewPageProps) {
const params = await props.params
const vendorId = parseInt(params.vendorId, 10)
const submissionId = parseInt(params.submissionId, 10)
-
+
+ // 파라미터 유효성 검증
+ if (isNaN(vendorId) || isNaN(submissionId)) {
+ return (
+ <div className="container mx-auto p-6">
+ <div className="text-center">
+ <h1 className="text-2xl font-bold text-red-600">잘못된 접근</h1>
+ <p className="text-gray-600 mt-2">유효하지 않은 파라미터입니다.</p>
+ </div>
+ </div>
+ )
+ }
+
try {
// PQ Submission 정보 조회
const pqSubmission = await getPQById(submissionId, vendorId)
// PQ 데이터 조회 (질문과 답변)
const pqData = await getPQDataByVendorId(vendorId, pqSubmission.projectId || undefined)
-
+
+ // 협력업체 정보 (pqSubmission에 이미 포함되어 있음)
+ const vendorInfo = {
+ vendorName: pqSubmission.vendorName,
+ vendorCode: pqSubmission.vendorCode,
+ vendorStatus: pqSubmission.vendorStatus,
+ vendorCountry: pqSubmission.vendorCountry,
+ vendorEmail: pqSubmission.vendorEmail,
+ vendorPhone: pqSubmission.vendorPhone,
+ vendorFax: pqSubmission.vendorFax,
+ }
+
// 프로젝트 정보 (프로젝트 PQ인 경우)
const projectInfo = pqSubmission.projectId ? {
id: pqSubmission.projectId,
@@ -60,9 +83,6 @@ export default async function PQReviewPage(props: PQReviewPageProps) {
const statusLabel = getStatusLabel(pqSubmission.status)
const statusVariant = getStatusVariant(pqSubmission.status)
- // 수정 가능 여부 (SUBMITTED 상태일 때만 가능)
- const canReview = pqSubmission.status === "SUBMITTED"
-
return (
<Shell className="gap-6 max-w-5xl">
<div className="flex items-center justify-between">
@@ -136,7 +156,7 @@ export default async function PQReviewPage(props: PQReviewPageProps) {
pqData={pqData}
vendorId={vendorId}
pqSubmission={pqSubmission}
- canReview={canReview}
+ vendorInfo={vendorInfo}
/>
</TabsContent>
@@ -156,7 +176,21 @@ export default async function PQReviewPage(props: PQReviewPageProps) {
<p className="text-sm font-medium text-muted-foreground">상태</p>
<p>{pqSubmission.vendorStatus}</p>
</div>
- {/* 필요시 추가 정보 표시 */}
+ <div>
+ <p className="text-sm font-medium text-muted-foreground">국가</p>
+ <p>{pqSubmission.vendorCountry}</p>
+ </div>
+ <div>
+ <p className="text-sm font-medium text-muted-foreground">이메일</p>
+ <p>{pqSubmission.vendorEmail}</p>
+ </div>
+ <div>
+ <p className="text-sm font-medium text-muted-foreground">전화번호</p>
+ <p>{pqSubmission.vendorPhone}</p>
+ </div>
+
+
+ {/* 필요시 추가 정보 표시 */}
</div>
</div>
</TabsContent>